package rdw.robot;

import java.awt.Robot;

/**
 * MouseRobot implements the mouse functions for the RemoteRobot.
 */
public class MouseRobot
{
	private static final int SCROLL_AMOUNT = 5;
	
	private Robot robot;
	
	public MouseRobot(Robot robot)
	{
		this.robot = robot;
	}

	public void click(int button)
	{
		robot.mousePress(button);
		robot.mouseRelease(button);
	}
	
	public void move(int x, int y)
	{
		robot.mouseMove(x, y);
	}
	
	public void scrollUp()
	{
		robot.mouseWheel(-1*SCROLL_AMOUNT);
	}
	
	public void scrollDown()
	{
		robot.mouseWheel(SCROLL_AMOUNT);
	}
}
